// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.enums;

/**
 * 热点栏目业务类型枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2023-02-21
 */
public enum ButlerHotTypeEnum {
    ALL(0, "全部"),
    NEWS(1, "最新热点"),
    HISTORY(2, "历史热点");

    private int value;

    private String name;

    ButlerHotTypeEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(int value) {
        ButlerHotTypeEnum arrObj[] = ButlerHotTypeEnum.values();
        for (ButlerHotTypeEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getName();
            }
        }
        return " ";
    }

}
